﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace CNSpider
{
    class Debugger
    {
        static public Form myForm = null;
        static public TextBox buffer = null;
        static public void AppendText(string dbgInfo)
        {
            myForm.BeginInvoke(new MethodInvoker(() =>
                {
                    buffer.AppendText(dbgInfo + "\n");
                }));
        }
        static public void Clear()
        {
            myForm.BeginInvoke(new MethodInvoker(() =>
            {
                buffer.Clear();
            }));
        }
    }
}
